package com.yingxin.yx.framework.commons.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author fanchao
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class PageIn implements Serializable {

    private static final long serialVersionUID = -6387419775146484644L;

    /**
     * 页号
     */
    @ApiModelProperty(value = "页号")
    private int pageNo = 1;

    /**
     * 页大小
     */
    @ApiModelProperty(value = "页大小")
    private int pageSize = 50;

    /**
     * 排序规则 asc(升序) desc(降序)
     */
    @ApiModelProperty(value = "排序规则 asc(升序) desc(降序)")
    private String sortOrder;

    /**
     * 排序字段
     */
    @ApiModelProperty(value = "排序字段")
    private String orderBy;

    @ApiModelProperty(value = "搜索字段 wd")
    private String wd;

    /**
     * 创建者id
     */
    @ApiModelProperty("创建人,添加人,申请人,操作人,出库人,入库人 id")
    private String creatorId;

    /**
     * 创建者名称
     */
    @ApiModelProperty("创建人,添加人,申请人,操作人 名称")
    private String creatorName;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建人,添加人,申请人,操作人 时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新者id
     */
    @ApiModelProperty("更新者id")
    private String updaterId;

    /**
     * 更新者名称
     */
    @ApiModelProperty("更新者名称")
    private String updaterName;

    /**
     * 更新时间
     */
    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 打印人id
     */
    @ApiModelProperty(value = "打印人id")
    private String printerId;

    /**
     * 打印人名称
     */
    @ApiModelProperty(value = "打印人名称")
    private String printerName;

    /**
     * 打印时间
     */
    @ApiModelProperty(value = "打印时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date printTime;

    /**
     * 打印次数
     */
    @ApiModelProperty(value = "打印次数")
    private Integer printCount;

    private List<String> companyIds;

    /* 时间范围查询全部移到这里 */

    @ApiModelProperty(value = "创建时间 start")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTimeBegin;

    @ApiModelProperty(value = "创建时间 end")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTimeEnd;

    @ApiModelProperty(value = "时间 开始 ")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date timeBegin;

    @ApiModelProperty(value = "时间 结束 ")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date timeEnd;

    @ApiModelProperty(value = "入库时间start")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date stockCreateTimeBegin;

    @ApiModelProperty(value = "入库时间end")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date stockCreateTimeEnd;

    @ApiModelProperty(value = "销售时间开始 ")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date saleTimeBegin;

    @ApiModelProperty(value = "销售时间结束 ")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date saleTimeEnd;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date preparerTimeBegin;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date preparerTimeEnd;

    @ApiModelProperty(value = "完结时间开始 ")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTimeBegin;

    @ApiModelProperty(value = "完结时间结束 ")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTimeEnd;

    @ApiModelProperty(value = "审核时间 开始 ")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date approvalTimeBegin;

    @ApiModelProperty(value = "审核时间 结束 ")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date approvalTimeEnd;

    @ApiModelProperty(value = "出库时间 begin")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date stockOutTimeBegin;

    @ApiModelProperty(value = "出库时间 end")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date stockOutTimeEnd;

    @ApiModelProperty(value = "原材完成时间 begin")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date completionTimeBegin;

    @ApiModelProperty(value = "原材完成时间 end")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date completionTimeEnd;

    @ApiModelProperty(value = "不含货主")
    private List<String> unOwnerIds;

    /**
     * 参数
     */
    //@ApiModelProperty
    //private Map<String, Object> params = Maps.newHashMap();
    @Override
    public String toString() {
        return "PageIn [" +
                ", pageNo=" + pageNo +
                ", pageSize=" + pageSize +
                ", sortOrder=" + sortOrder +
                ", orderBy=" + orderBy
                + "]";
    }

}